package com.atzly.community.datasource;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.context.ApplicationContext;

/**
 * @author zlysimida
 * @date 2022/11/27 - 13:25
 */
@Data
@AllArgsConstructor
public class SpringContextUtil {

    public static ApplicationContext applicationContext;

    public static <T> T  getBean(String beanName) {
        return (T) applicationContext.getBean(beanName);
    }
}
